home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / aix-faq / part2 < prev    next >
Encoding:
Text File  |  1995-07-25  |  69.4 KB  |  1,860 lines

  1. Subject: AIX Frequently Asked Questions (Part 2 of 3)
  2. Newsgroups: comp.unix.aix,comp.answers,news.answers
  3. From: jwarring@amsinc.com (Jeff Warrington)
  4. Date: 14 Nov 1994 05:15:20 GMT
  5.  
  6. Archive-name: aix-faq/part2
  7. Last-modified: Nov 13, 1994
  8. Version: 3.70
  9.  
  10.  
  11. Version: $Id: faq.2,v 1.7 1994/10/13 03:46:52 jwarring Exp $
  12.  
  13. Frequently Asked Questions to AIX 3.x and IBM RS/6000
  14. _____________________________________________________
  15.  
  16. 1.201: How do I do remote backup?
  17.  
  18. There seems to be several ways of doing this. I found the following works:
  19.  
  20.   tar -b1 -cf - . | rsh REMOTEHOST "dd ibs=512 obs=1024 of=/dev/TAPEDEVICE"
  21.  
  22.  
  23. From: kraemerf@franvm3.VNET.IBM.COM (Frank Kraemer)
  24.  
  25. mksysb will not back up to remote tape devices. The following script
  26. will do remote backups.
  27.  
  28. [Ed.: I've verified this script works fine. However, it may be slow for
  29.  large filesystems since it creates a temp file of filenames in /tmp.]
  30.  
  31. #!/bin/ksh
  32. # @(#) Create a backup tape of the private user data.
  33. #=================================================================#
  34. #   Script :  usave.sh                                            #
  35. #   Author :  F. Kraemer                                          #
  36. #   Date   :  92/02/19                                            #
  37. #   Update :  92/10/29                                            #
  38. #   Info   :  the ultimative backup script                        #
  39. #   Example:  usave.sh /dev/rmt0      -  save to local tape       #
  40. #             usave.sh /save/save.me  -  save to local file       #
  41. #             usave.sh /tmp/pipe      -  save to remote tape      #
  42. #-----------------------------------------------------------------#
  43. PS4="(+) "
  44. #set -x
  45. PROG=$(basename $0)
  46. HOST=$(hostname)
  47. TODAY=$(date +%H:%M:%S)
  48. #
  49. # cleanup
  50. #
  51. cleanup ()
  52. {
  53. ec=$1
  54. error=$2
  55. case "$ec"
  56. in
  57.    "$USAGE_EC")    # usage error
  58.      error="Usage:\t$PROG DeviceName\n" 1>&2
  59.     ;;
  60.    "$NOTAP_EC")    # Tape error
  61.      error="error:\t$PROG: $DEVICE is not available on the system.\n" 1>&2
  62.     ;;
  63.    "$LISTE_EC")    # list error
  64.      error="error:\t$PROG: could not create tar list for $LOGNAME.\n" 1>&2
  65.     ;;
  66.    "$NOTAR_EC")    # tar command error
  67.      error="error:\t$PROG: tar command failed.\n" 1>&2
  68.     ;;
  69.    "$PIPEP_EC")    # pipe error
  70.      error="error:\t$PROG: mknod command failed.\n" 1>&2
  71.     ;;
  72.    "$NORSH_EC")    # rsh error
  73.      error="error:\t$PROG: rsh - Remote Shell command failed.\n" 1>&2
  74.     ;;
  75.    "$RHOST_EC")    # remote host error
  76.      error="error:\t$PROG: Remote Host unknown.\n" 1>&2
  77.     ;;
  78.    *)
  79.    ;;
  80. esac
  81. case "$DEVICE"
  82. in
  83.     #
  84.     # Fix the block size if $DEVICE is a tape device
  85.     #
  86.     /dev/rmt[0-9]*)
  87.         echo "\n\t$PROG: Rewinding tape to begin.........(please wait)\n"
  88.         tctl -f $DEVICE rewind 2>/dev/null
  89.         ;;
  90.     *) ;;
  91. esac
  92. rm -f ${LIST} ${PIPE} 2>/dev/null
  93. [ -n "$error" ] && echo "\n${error}\n"
  94. trap '' 0 1 2 15
  95. exit "$ec"
  96. }
  97. #
  98. # Variables
  99. #
  100. USAGE_EC=1                         # exit code for usage error
  101. NOMNT_EC=2                         # exit code wrong device name
  102. NOTAP_EC=3                         # exit code no tape available
  103. LISTE_EC=4                         # exit code backup list error
  104. NOTAR_EC=5                         # exit code for wrong tar
  105. TRAPP_EC=6                         # exit code for trap
  106. PIPEP_EC=7                         # exit code for pipe
  107. RHOST_EC=8                         # exit code for bad ping
  108. NORSH_EC=9                         # exit code for bad rsh
  109. DEVICE="$1"                        # device to tar into
  110. LIST="/tmp/.tar.$LOGNAME.$$"       #
  111. REMOTEH=""                         # Remote host for backup
  112. REMOTET=""                         # Remote tape for backup
  113. tapedev=                           #
  114. PIPE="/tmp/pipe"                   # Pipe for remote backup
  115. #
  116. # main()
  117. #
  118. tput clear
  119. echo "\n\t$PROG started from $LOGNAME@$HOST on $TERM at $TODAY.\n"
  120. rm -f $LIST 2>/dev/null
  121. #
  122. # Trap on exit/interrupt/break to clean up
  123. #
  124. trap "cleanup $TRAPP_EC \"Abnormal program termination. $PROG"\"  0 1 2 15
  125. #
  126. # Check command options
  127. #
  128. [ "$#" -ne 1 ]  &&  cleanup "$USAGE_EC" ""
  129. #
  130. # Check device name
  131. #
  132. [ `expr "$DEVICE" : "[/]"` -eq 0 ] && cleanup "$NOMNT_EC" \
  133.         "$PROG: Backup device or file name must start with a '/'."
  134. #
  135. # Check tape device
  136. #
  137. case "$DEVICE"
  138. in
  139.     #
  140.     # Fix the block size if $DEVICE is a tape device
  141.     #
  142.     /dev/rmt[0-9]*)
  143.         #
  144.         echo "\n\t$PROG: Verify backup media ($DEVICE)............\n"
  145.         #
  146.         # see if a low or high density tape device was specified
  147.         # (eg rmt0.1)
  148.         density="`expr $DEVICE : \
  149.                 "/dev/rmt[0-9]*\.\([0-9]*\)"`"
  150.         #
  151.         # strip /dev/ from device name and
  152.         # get the base name (eg translate:
  153.         # /dev/rmt0.2 to rmt0)
  154.         #
  155.         tapedev="`expr $DEVICE : \
  156.                 "/dev/\(rmt[0-9]*\)[\.]*[0-9]*"`"
  157.         #
  158.         # Check if the tape is defined in the system.
  159.         lsdev -C -c tape -S Available -F "name" | grep $tapedev >/dev/null 2>&1
  160.         rc=$?
  161.         [ "$rc" -ne 0 ] && cleanup "$NOTAP_EC" ""
  162.         #
  163.         # Restore old tape name.
  164.         #
  165.         [ "${density:-1}" -lt 4 ] && density=1 || density=5
  166.         DEVICE="/dev/${tapedev}.${density}"
  167.         echo "\n\t$PROG: Insert a tape in ($DEVICE)........(press enter)\n"
  168.         read TEMP
  169.         echo "\n\t$PROG: Rewinding tape to begin...........(please wait)\n"
  170.         tctl -f $DEVICE rewind 2>/dev/null
  171.         ;;
  172.     #
  173.     # Backup is done on remote host. The remote shell facility
  174.     # must be set up and running.
  175.     #
  176.     ${PIPE}*)
  177.         #
  178.         echo "\n\t$PROG: Assuming remote backup via network.\n"
  179.         echo "\t$PROG: Enter name of Remote Host   ===> \c"
  180.         read REMOTEH
  181.         echo "\n\t$PROG: Pinging Remote Host to test connection.\n"
  182.         ping ${REMOTEH} 1 1 >/dev/null 2>&1
  183.         rc=$?                                    # give up unknown host
  184.         [ "$rc" -ne 0 ] && cleanup "$RHOST_EC" ""
  185.         JUNK=$(rsh ${REMOTEH} "/usr/sbin/lsdev -C -c tape -S Available")
  186.         rc=$?                                    # give up rsh failed
  187.         [ "$rc" -ne 0 ] && cleanup "$NORSH_EC" ""
  188.         echo "\t$PROG: Available Tapes on ${REMOTEH} are :\n\n\t\t${JUNK}\n"
  189.         echo "\t$PROG: Enter name of Remote Tape (e.g. /dev/rmt0) ===> \c"
  190.         read REMOTET
  191.         echo "\n\t$PROG: Insert tape on ${REMOTEH} in ${REMOTET}..(press enter)"
  192.         read TEMP
  193.         echo "\t$PROG: Rewinding Remote Tape ${REMOTET} on ${REMOTEH}.\n"
  194.         rsh ${REMOTEH} "tctl -f ${REMOTET} rewind"
  195.         rc=$?                                    # give up rsh failed
  196.         [ "$rc" -ne 0 ] && cleanup "$NOTAP_EC" ""
  197.         rm -f ${PIPE} 2>/dev/null
  198.         mknod ${PIPE} p
  199.         rc=$?                                    # give up mknod failed
  200.         [ "$rc" -ne 0 ] && cleanup "$PIPEP_EC" ""
  201.         cat ${DEVICE} | rsh ${REMOTEH} "dd of=${REMOTET} obs=100b 2>/dev/null" &
  202.         ;;
  203.     *)  ;;
  204. esac
  205. #
  206. # Prepare the list
  207. #
  208. echo "\n\t$PROG: Create list of files to be saved...."
  209. find $HOME -print > $LIST
  210. rc=$?
  211. [ "$rc" -ne 0 ] &&  cleanup "$LISTE_EC" ""
  212. #
  213. # tar the files
  214. #
  215. echo "\n\t$PROG: Changing current directory to (/)...."
  216. cd / > /dev/null 2>&1
  217. echo "\n\t$PROG: Running tar format backup from user ($LOGNAME)...."
  218. tar -cvf "$DEVICE" -L "$LIST"
  219. rc="$?"
  220. [ "$rc" -ne 0 ]  && cleanup "$NOTAR_EC" ""
  221. #
  222. # Backup completed
  223. #
  224. TODAY=$(date +%H:%M:%S)
  225. echo "\n\t$PROG ended at $TODAY............................\n\n"
  226. cleanup 0
  227.  
  228.  
  229. 1.202: How do I backup a multi-disk volume group?
  230. From: pack@acd.ucar.edu (Daniel Packman)
  231.  
  232. [ Ed.: I have not verified this procedure. I would actually recommend
  233.   NOT to have one volume group span multiple disks unless you really
  234.   need such big logical volumes. ]
  235.  
  236.   1. If you have a set of three or more disks in a volume group
  237.      (typically 3 for 5xx machines with three internal drives;
  238.      with only two, the procedures outlined here have to be modified
  239.      to ignore the fact that you don't have a quorum in the volume group)
  240.  
  241.   2. If one drive has failed (usually only one fails at a time :-) )
  242.  
  243. It is possible to go through a service boot (the volume group is called
  244. rootvg and one of the 2 good disks on it is called hdisk0):
  245.  
  246.   importvg -y rootvg hdisk0
  247.   varyonvg -f -n -m1 rootvg
  248.  
  249. These commands will work, but give error messages. If you wish to mount
  250. a user filesystem, say /u on logical volume /dev/lv00, then
  251.  
  252.   mount -f /dev/lv00 /v
  253.  
  254. will work only if jfslog, the journaled file system log device, is not
  255. on the damaged disk. If it is, you must (and can in any case) mount the
  256. filesystem read-only:
  257.  
  258.   mount -f -r /dev/lv00 /v
  259.  
  260. This crucial and rather obvious point baffled several level 3 support
  261. personnel at Austin as well as myself for almost a week. Once the file
  262. system(s) of interest are available, they can be saved to tape for
  263. restoration later. Of course, one can expect only about two thirds of a
  264. filesystem to be recoverable if it spans all 3 physical disks. One
  265. other point to remember is that the standard boot procedure from floppy
  266. includes the restore command but does not include the backup command.
  267.  
  268. *****************************************************************************
  269. * If you do not have other RS6000 machines at your site it is imperative    * 
  270. * that you either build a bootable tape which includes either restore or    * 
  271. * tar or cpio (a bootable floppy set will not have enough space) or at the  *
  272. * very least copy onto a spare floppy backup, cpio, or tar.  The floppy     *
  273. * should be created with backup -ivq so that its contents can be read into  *
  274. * the memory resident system after booting.                                 *
  275. *****************************************************************************
  276.  
  277. All is not lost if tar, cpio or backup are available on an undamaged
  278. disk that can be mounted. Since tar and cpio are in /bin, they may both
  279. very well be unavailable.
  280.  
  281. It is a very good idea for those who have tape devices to build a
  282. bootable tape with their desired extra commands in it. Follow the
  283. instructions from IBM but add your desired commands to the following
  284. three files:
  285.  
  286.     /usr/lpp/bosinst/tape2
  287.     /usr/lpp/bosinst/diskette/boot2
  288.     /usr/lpp/bosinst/diskette/inslist
  289.  
  290. If you have anything other than a minimum memory configuration, you
  291. should be able to add many commands.
  292.  
  293.  
  294. 1.203: How do I put multiple backups on a single 8mm tape?
  295. From: kerm@mcnc.org (Cary E. Burnette)
  296.  
  297. There are two possible solutions to this, both of which use /dev/rmt0.1
  298. which is non-rewinding.
  299.  
  300. SOLUTION #1
  301. -----------
  302.  
  303. To put multiple backups on a single tape, use /dev/rmt0.1, which is a
  304. no-rewind device, using either rdump or backup (both by name & inode
  305. work). Using rdump or backup "byinode" both generate the message that
  306. the tape is rewinding but actually do not. This is an example that
  307. works on my system:
  308.  
  309. # rsh remote1 -l root /etc/rdump host:/dev/rmt0.1 -Level -u /u
  310. # rsh remote2 -l root /etc/rdump host:/dev/rmt0.1 -Level -u /u
  311. # tctl -f /dev/rmt0.1 rewind       # rewinds the tape
  312.  
  313. where I am implementing the command from host.
  314. To restore a table of contents of the first I would use 
  315.  
  316. # restore -f /dev/rmt0.1 -s1 -tv
  317.  
  318. where the -s1 flag tells restore to go to the first record on the tape. 
  319. Type the exact command again to get the second record. The -s(Number)
  320. means go to Number record from this spot. It works pretty well.
  321.  
  322.  
  323. SOLUTION #2
  324. -----------
  325.  
  326. Steve Knodle
  327. Educational Resources Center
  328. Clarkson University
  329.  
  330. I use:
  331. ------------------- Dump.sh --------------------
  332. CONTENTSFILE=`date |dd conv=lcase |sed -e 's/19//' |awk '{print $6 $2 $3}'`
  333. set -x
  334. LEVEL=$1
  335. shift
  336.  
  337. backup -c -b 56 -$LEVEL -uf /dev/rmt0.1 /
  338. backup -c -b 56 -$LEVEL -uf /dev/rmt0.1 /usr
  339. backup -c -b 56 -$LEVEL -uf /dev/rmt0.1 /u
  340. tctl -f /dev/rmt0 rewind
  341.  
  342. touch /usr/local/dumps/Contents.$CONTENTSFILE
  343. echo "Dumping /" >>/usr/local/dumps/Contents.$CONTENTSFILE
  344. restore -t -s 1 -f /dev/rmt0.1 >>/usr/local/dumps/Contents.$CONTENTSFILE
  345. echo "Dumping /usr" >>/usr/local/dumps/Contents.$CONTENTSFILE
  346. restore -t -q -s 1 -f /dev/rmt0.1 >>/usr/local/dumps/Contents.$CONTENTSFILE
  347. echo "Dumping /u" >>/usr/local/dumps/Contents.$CONTENTSFILE
  348. restore -t -q -s 1 -f /dev/rmt0.1 >>/usr/local/dumps/Contents.$CONTENTSFILE
  349. tctl -f /dev/rmt0 rewind
  350.  
  351. I process the table-of-contents first by a little program that does
  352. common prefix encoding, and then compress.
  353.  
  354. This gives a table of contents file I can keep on-line until the tape
  355. is reused.
  356.  
  357.  
  358. 1.204: How can I make an exact duplicate of a tape over the network?
  359.  
  360. The challenge here is not to have to create a temporary file (disk space
  361. limitation) and work across heterogeneous networks.
  362.  
  363. This script might work:
  364.  
  365. LOCAL=/dev/tape_dev
  366. REMOTE=/dev/tape_dev
  367. dd if=$LOCAL ibs=64k obs=512 | rsh remote_host dd ibs=512 obs=64k of=$REMOTE
  368.  
  369.  
  370. From: pack@acd.ucar.edu (Daniel Packman)
  371.  
  372. Daniel provides the following perl script to convert from the known
  373. world's function codes to AIX for compatibility.
  374.  
  375. #!/bin/perl
  376. # Wrapper to convert input rmt requests to
  377. # AIX 3.2 ioctl numbers.  We pass on all commands we don't understand
  378. # I0 MTWEOF -> I10  STWEOF write and end-of-file record
  379. # I1 MTFSF  -> I11  STFSF  forward space file
  380. # I2 MTBSF  -> I12  STRSF  reverse space file
  381. # I3 MTFSR  -> I13  STFSR  forward space record
  382. # I4 MTBSR  -> I14  STRSR  reverse space record
  383. # I5 MTREW  -> I6   STREW  rewind
  384. # I6 MTOFFL -> I5   STOFFL rewind and unload tape
  385. # I7 MTNOP  -> I0   (no-op? should ignore following count)
  386. # I8 MTRETEN-> I8   STRETEN retension tape, leave at load point
  387. # I9 MTERASE-> I7   STERASE erase tape, leave at load point
  388. #I10 MTEOM (position to end of media ... no ibm equivalent?)
  389. #I11 MTNBSF  (backward space file to BOF ... no ibm equivalent?)
  390. @iocs = (10,11,12,13,14,6,5,0,8,7);
  391. open(RMT,"|/usr/sbin/rmt") || die "Can't open pipe to rmt\n";
  392. select(RMT);
  393. $| = 1;
  394. while (<STDIN>) {
  395.   s/(^I)(\d$)/I$iocs[$2]/;
  396.   exit 0 if $_ =~ /^[Qq]/;
  397.   print RMT $_ ; }
  398. exit 0;
  399.  
  400.  
  401. 1.205: What is tape block size of 0?
  402. From: benson@odi.com (Benson I. Margulies)
  403.  
  404. Tape devices are generally split into two categories: fixed block and
  405. variable block.  1/4" tape is the fixed block, and 8mm is variable.
  406.  
  407. On a fixed block size device, the kernel always sends data to the device
  408. in suitable block size lumps, and varying the size passed to write(2)
  409. (e.g., via the bs option to dd) gives the kernel more data to stream. 
  410. On a variable block size device, the kernel writes to the device
  411. whatever passed to it. On an 8mm, it had better be a multiple of 1024
  412. to get efficient tape usage.
  413.  
  414. AIX has the World's Only Variable Block Size 1/4" tape drive. If you
  415. use SMIT to set the block size to a nonzero value, AIX treats the device
  416. as fixed block size, whether it is or not. By default, 8mm drives are
  417. set to the same size as 1/4", 512 bytes. This is wasteful, but
  418. otherwise mksysb and installp would fail.
  419.  
  420. If you set the block size to 0, the device is treated as variable block
  421. size, and the size passed to write becomes the physical block size. 
  422. Then if you use a sensible block size to dd, all should be wonderful.
  423.  
  424.  
  425. 1.206: Resetting a hung tape drive
  426. From: Craig_Anderson@kcbbs.gen.nz (Craig Anderson)
  427.  
  428. A process accesses the tape drive. The process stops, exits, or whatever,
  429. but still hold on to the drive. When this happens, the process cannot be
  430. killed by any signal and the tape drive cannot be used by any other
  431. process until the machine is rebooted.
  432.  
  433. The following should help:
  434.  
  435. RESET:
  436.  
  437. AIX, like most UNIX systems has no reset function for tape drives. You
  438. can however send a Bus Device Reset (a standard SCSI message) to the
  439. tape drive using the following piece of code. If the tape drive does
  440. not respond to the BDR, then a SCSI Bus Reset will be sent (and this
  441. will reset every device on the SCSI Bus). SCSI Bus resets are rather
  442. extreme so you should refrain from using this program unnecessarily. 
  443. But there are times (like after you've inserted a jammed/old/bad tape in
  444. an 8mm drive), when there's no other way to reset the device other than
  445. to shutdown and reboot (obviously you can power down and up an external
  446. drive to reset it - and this would be the better choice).
  447.  
  448. This is actually documented in info, but can be hard to find and
  449. there's no complete program.
  450.  
  451. /* taperst: resets the tape drive by sending a BDR to the drive. */
  452. #include <stdio.h>
  453. #include <fcntl.h>
  454. #include <errno.h>
  455. #include <sys/scsi.h>
  456.  
  457. int main(int argc, char **argv)
  458. {
  459.          /* This can be run only by root */
  460.  
  461.          if (argc != 2) {
  462.              fprintf(stderr, "Usage: %s /dev/rmt#\n", argv[0]);
  463.              return 1;
  464.          }
  465.  
  466.          if (openx(argv[1], O_RDONLY, 0, SC_FORCED_OPEN) < 0) {
  467.              perror(argv[0]);
  468.              return 2;
  469.          }
  470.          return 0;
  471. }
  472.  
  473. 1.207: How do I read a mksysb tape with tar?
  474. From: Marc Pawliger (marc@sti.com)
  475.  
  476. To recover specific files from a backup made with mksysb, try
  477. $ tctl fsf 3
  478. $ tar xvf/dev/rmt0.1 ./your/file/name
  479.  
  480.  
  481. 1.208: How do I read a 5Gbyte tape on a 2Gbyte drive?
  482. Posted by: bobmet@clam.com (Robert Metcalf)
  483.  
  484. To read a 5Gbyte tape on a 2Gbyte drive, the
  485. tape needs to have been created with a density setting of 20.
  486.  
  487. The following is from IBM's electronic ASKSUPPORT repository:
  488.   
  489.    R: The 7208 011 5 GB tape drive has various density settings which are
  490.       as follows:
  491.   
  492.      +-------+--------------------------+
  493.      | DENSIT| DESCRIPTION              |
  494.      | SETTIN|                          |
  495.      +-------+--------------------------+
  496.      | 140   | Writes in 5.0GB mode and |
  497.      |       | will enable data com-    |
  498.      |       | pression; also, to do    |
  499.      |       | compression you must use |
  500.      |       | "DATA COMPRESSION = yes" |
  501.      +-------+--------------------------+
  502.      | 21    | Writes in 5.0GB mode and |
  503.      |       | will NOT do data com-    |
  504.      |       | pression                 |
  505.      +-------+--------------------------+
  506.      | 20    | Writes in 2.3GB mode and |
  507.      |       | will NOT do data com-    |
  508.      |       | pression                 |
  509.      +-------+--------------------------+
  510.      | 00    | Factory power-on default |
  511.      |       | for 5.0GB data com-      |
  512.      |       | pression mode            |
  513.      +-------+--------------------------+
  514.   
  515.      The density setting of the 7208 011 must be 20 for it to make a tape
  516.      that is readable by the 7208 001.
  517.  
  518. ______________________________________________________________________________
  519. 1.300: Some info about the memory management system
  520. From: Michael Coggins (MCOG@CHVM1.VNET.IBM.COM).
  521.  
  522. 1. Does AIX use more paging space than other unix systems?
  523.  
  524. Under many scenarios, AIX requires more paging space than other unix
  525. systems. The AIX VMM implements a technique called "early allocation of
  526. paging space". When a page is allocated in RAM, and it is not a
  527. "client" (NFS) or a "persistent" (disk file) storage page, then it is
  528. considered a "working" storage page. Working storage pages are commonly
  529. an application's stack, data, and any shared memory segments. So, when
  530. a program's stack or data area is increased, and RAM is accessed, the
  531. VMM will allocate space in RAM and space on the paging device. This
  532. means that even before RAM is exhausted, paging space is used. This
  533. does not happen on many other unix systems, although they do keep track
  534. of total VM used.
  535.  
  536. Example 1: 
  537. Workstation with 64mb RAM is running only one small application that
  538. accesses a few small files. Everything fits into RAM, including all
  539. accessed data. On AIX, some paging space will already be used. On
  540. other unix systems, paging space will be 100% free. Clearly, this is an
  541. example that shows where we use more paging space than the other machines.
  542.  
  543. Example 2:
  544.  
  545. Same machine as above, except we are in an environment where many
  546. applications are running with inadequate RAM. Also, the system is
  547. running applications that are started, run, left idle, and not in
  548. constant use. A session of FRAME running in a window, for example. 
  549. What happens is that eventually (theoretically) all applications will be
  550. paged out at least once. On the AIX system and the other systems the
  551. total paging requirements will be the same (assuming similar malloc
  552. algorithm). The major difference is that the AIX system allocated the
  553. paging space pages before they were actually needed, and the other
  554. systems did not allocate them until they were needed. However, most
  555. other systems have an internal variable that gets incremented as virtual
  556. memory pages are used. AIX does not do this. This can cause the AIX
  557. system to run out of paging space (virtual memory), even though malloc()
  558. continues to return memory. This "feature" allows sparse memory
  559. segments to work, but requires that all normal users of malloc()
  560. (sbrk()) know how much virtual memory will be available (actually
  561. impossible), and to handle a paging space low condition. A big problem. 
  562. There are some pretty obvious pros and cons to both methods of doing
  563. Virtual Memory.
  564.  
  565. 2. How much paging space do I need?
  566.  
  567. Concerning the rule of thumb of having 2 times RAM for paging space:
  568. this is rather simplistic, as are most rules of thumb.  If the machine
  569. is in a "persistent storage environment", meaning that they have a few
  570. small programs, and lots of data, they may not need even as much as 1
  571. times RAM for paging space.  For example, a 1GB database server running
  572. on a 6000 with 256MB of RAM, and only running about 50MB of "working"
  573. storage does not need 512MB of paging space, or even 256MB.  They only
  574. need the amount of paging space that will allow all their working
  575. storage to be paged out to disk.  This is because the 1GB database is
  576. mostly "persistent storage", and will require little or no paging space. 
  577. Excessive paging space may simply mean wasted disk space.  However,
  578. avoid insufficient paging space.  Tip: Don't have more than one paging
  579. space per disk.  Tip: Put lots of RAM in your system - it will use it.
  580.  
  581. 3. Why does vmstat show no free RAM pages?
  582.  
  583. AIX uses RAM as a possibly huge disk buffer.  If you read a file in the
  584. morning, that file is read into RAM, and left there.  If no other
  585. programs need that RAM, that file will be left in RAM until the machine
  586. is halted.  This means that if you need the file again, access will be
  587. quick.  If you need that RAM, the system will simply use the pages the
  588. file were using. The pages were flushed back to disk earlier.  This
  589. means that you can get a huge speedup in disk access if you have enough
  590. RAM.  For example, a 200MB database will just ease into RAM if you have
  591. a 256MB system.
  592.  
  593. 4. Since vmstat shows no free RAM pages, am I out of RAM?
  594.  
  595. Probably not. Since disk files will be "mapped" into RAM, if vmstat
  596. shows lots of RAM pages FREE, then you probably have too much RAM (not
  597. usual on a RISC System/6000)!
  598.  
  599. 5. Shouldn't the "avm" and the "fre" fields from vmstat add up to something?
  600.  
  601. No. The "avm" field tells you how much "Active Virtual Memory" AIX
  602. thinks you are using. This will closely match the amount of paging
  603. space you are using. This number has *ABSOLUTELY* nothing to do with
  604. the amount of RAM you are using, and does *NOT* include your mapped
  605. files (disk files).  The amount of RAM can be determined with
  606. /usr/sbin/bootinfo -r
  607.  
  608. 6. Why does the "fre" field from vmstat sometimes show lots of free
  609.    RAM pages?
  610.  
  611. This will happen after an application that used a lot of RAM via
  612. "working" storage (not NFS storage, and not disk file or "persistent"
  613. storage) exits. When RAM pages that were used by working storage (a
  614. program's stack and data area) are no longer needed, there is no need to
  615. leave them around. AIX completely frees these RAM pages. The time to
  616. access these pages versus a RAM page holding a "sync'd" mapped file is
  617. almost identical. Therefore, there is no need to periodically "flush" RAM.
  618.  
  619. 7. Is the vmstat "fre" field useful?
  620.  
  621. The vmstat "fre" field represents the number of free page frames.  If
  622. the number is consistently small (less than 500 pages), this is normal. 
  623. If the number is consistently large (greater than 4000 pages), then you
  624. have more memory than you need in this machine.
  625.  
  626.  
  627. 1.301: How much should I trust the ps memory reports?
  628. From: chukran@austin.VNET.IBM.COM
  629.  
  630. Using "ps vg" gives a per process tally of memory usage for each running
  631. process.  Several fields give memory usage in different units, but these
  632. numbers do not tell the whole story on where all the memory goes.
  633.  
  634. First of all, the man page for ps does not give an accurate description
  635. of the memory related fields.  Here is a better description:
  636.  
  637. RSS - This tells how much RAM resident memory is currently being used
  638. for the text and data segments for a particular process in units of
  639. kilobytes.  (this value will always be a multiple of 4 since memory is
  640. allocated in 4 KB pages).
  641.  
  642. %MEM - This is the fraction of RSS divided by the total size of RAM for
  643. a particular process.  Since RSS is some subset of the total resident
  644. memory usage for a process, the %MEM value will also be lower than actual.
  645.  
  646. TRS - This tells how much RAM resident memory is currently being used
  647. for the text segment for a particular process in units of kilobytes. 
  648. This will always be less than or equal to RSS.
  649.  
  650. SIZE - This tells how much paging space is allocated for this process
  651. for the text and data segments in units of kilobytes.  If the executable
  652. file is on a local filesystem, the page space usage for text is zero. 
  653. If the executable is on an NFS filesystem, the page space usage will be
  654. nonzero.  This number may be greater than RSS, or it may not, depending
  655. on how much of the process is paged in.  The reason RSS can be larger is
  656. that RSS counts text whereas SIZE does not.
  657.  
  658. TSIZ - This field is absolutely bogus because it is not a multiple of 4
  659. and does not correlate to any of the other fields.
  660.  
  661. These fields only report on a process text and data segments.  Segment
  662. size which cannot be interrogated at this time are:
  663.  
  664.        Text portion of shared libraries (segment 13)
  665.  
  666.        Files that are in use. Open files are cached in memory as
  667.        individual segments.  The traditional kernel cache buffer
  668.        scheme is not used in AIX 3.
  669.  
  670.        Shared data segments created with shmat.
  671.  
  672.        Kernel segments such as kernel segment 0, kernel extension
  673.        segments, and virtual memory management segments.
  674.  
  675. Speaking of kernel segments, the %MEM and RSS report for process zero
  676. are totally bogus for AIX 3.1.  The reason why RSS is so big is that the
  677. kernel segment zero is counted twice.  For AIX 3.2, this has been
  678. changed, but the whole story is still not known.  The RSS value for
  679. process 0 will report a very small number of the swapper private data
  680. segment.  It does not report the size of the kernel segment 0, where the
  681. swapper code lives.
  682.  
  683. In summary, ps is not a very good tool to measure system memory usage. 
  684. It can give you some idea where some of the memory goes, but it leaves
  685. too many questions unanswered about the total usage.
  686.  
  687.  
  688. 1.302: Which simms do RS6000's use?
  689.  
  690. This answer is under construction... I'm trying to collect details
  691. about compatable simms.
  692.  
  693. RS/6000 220,230 USE 2 pair 70ns PS/2 style simms
  694. RS/6000 250,C10 USE 4 pair 70ns PS/2 style simms
  695.  
  696.  
  697. ______________________________________________________________________________
  698. 1.400: How do I make an informative prompt in the shell?
  699.  
  700. In the Korn Shell (ksh), the PS1 variable is expanded each time it is
  701. printed, so you can use:
  702.  
  703. $ export myhost=`hostname`
  704. $ PS1='$LOGNAME@$myhost $PWD \$ '
  705.  
  706. to get, e.g. 
  707.  
  708. bengsig@ieibm1 /u/bengsig $
  709.  
  710. In the C-shell, use:
  711.  
  712. % set myhost=`hostname`
  713. % alias cd 'chdir \!* > /dev/null; set prompt="$LOGNAME@$myhost $cwd % "'
  714. % cd
  715.  
  716. to get, e.g.
  717.  
  718. bengsig@dkunix9 /u/bengsig/aixfaq %
  719.  
  720. There is no easy solution in the Bourne Shell.  Use the Korn Shell instead.
  721.  
  722.  
  723. 1.401: How do I set up ksh for emacs mode command line editing?
  724.  
  725. The ksh has an undocumented way of binding the arrowkeys to the emacs
  726. line editing commands. In your .kshrc, add:
  727.  
  728. alias __A=`echo "\020"`   # up arrow = ^p = back a command
  729. alias __B=`echo "\016"`   # down arrow = ^n = down a command
  730. alias __C=`echo "\006"`   # right arrow = ^f = forward a character
  731. alias __D=`echo "\002"`   # left arrow = ^b = back a character
  732. alias __H=`echo "\001"`   # home = ^a = start of line
  733.  
  734. Type "set -o emacs" or put this line in your .profile.
  735.  
  736. Also, you MUST have PTF U406855 for this to work in AIX 3.2.  The APAR #
  737. for the problem is IX25982, which may have been superseded.
  738.  
  739.  
  740. 1.402: Listing files with ls causes a core dump
  741. From: John F Haugh II
  742.  
  743. Scenario: a directory that is shared by N users (N >= 200).
  744. Run 'ls -l' in that directory.  It goes for a while, then
  745. Seg fault(coredump)!
  746.  
  747. It only occurs when the usernames are displayed (almost every file is
  748. owned by a different person).  The -g and -n options work fine; only -l
  749. and -o (which shows owner and not group) cause it. 
  750.  
  751. I believe that this problem was corrected by U407548.  If you have that
  752. many users that you are having core dump problems (it took over 200),
  753. you might also want to look into getting the PTF that fixes IX31403. 
  754. That APAR deals with large numbers of accounts and performance problems
  755. associated with looking them up.
  756.  
  757.  
  758. 1.403: How do I put my own text into InfoExplorer?
  759.  
  760. With AIX 3.1, you cannot do it.  AIX 3.2 has a product called
  761. InfoCrafter that allows you to do that.
  762.  
  763.  
  764. 1.404: InfoExplorer ASCII key bindings 
  765. From: mycroft@hal.gnu.ai.mit.edu (Charles Hannum)
  766.  
  767. If you just press 'Return' when it starts up, with 'Basic Screen
  768. Operations' highlighted, you'll get some help.
  769.  
  770. If you look long enough, you'll find a page named 'Using Keys and Key
  771. Sequences in the InfoExplorer ASCII Interface'.  It describes the key
  772. sequences and actions.  Here are a few to get you started.
  773.  
  774. Keys       Action
  775.  
  776. Ctrl-W     Moves between the Navigation screen and the Reading screen.
  777. If the Navigation screen is displayed, you can press Ctrl-W to display
  778. the Reading screen.  If the Reading screen is displayed, you can press
  779. Ctrl-W to display the Navigation screen.
  780.  
  781. Ctrl-O     Makes the menu bar active or inactive.  If your text cursor is
  782. located in the text area of the screen, you can press Ctrl-O to make the
  783. menu bar active.  If the menu bar is already active, you can press
  784. Ctrl-O to make it inactive, which moves the text cursor to the text area.
  785.  
  786. Tab     Moves to the next menu bar option in the menu bar.  If a pull-down
  787. menu is not displayed and you press the Right Arrow key, the next menu
  788. bar option is displayed in reverse video.
  789.  
  790.  
  791. 1.405: How can I add new man pages to the system?
  792. From: horst@faui63.informatik.uni-erlangen.de (Horst Luehrsen)
  793.  
  794. Put the man pages in /usr/man, e.g. /usr/man/man1/tcsh.1 for the tcsh
  795. man page.  Unter AIX 3.1.10, /usr/lib/makewhatis can be used to update
  796. the makewhatis-database /usr/man/whatis so apropos and whatis know about
  797. the added manpages.  /usr/lib/makewhatis should be available on all 3.2
  798. versions.
  799.  
  800.  
  801. 1.406: Why can't I read man pages?  Where is nroff?
  802.  
  803. Nroff and troff aren't in the base installation.  It is shipped as
  804. part of AIX 3.2.5 but may not be installed.  Use smit to install a
  805. software package called txtfmt.tfs.obj from your 3.2.5 distribution
  806. media.
  807.  
  808. ______________________________________________________________________________
  809. 1.500  Which release of X11 do I have?
  810.  
  811. Run 'lslpp -h X11rte.obj'.
  812. If your output has a line similar to:
  813.  
  814.             01.02.0000.0000 COMPLETE   COMMIT     03/04/93   02:05:11 root
  815.  
  816. you have X11 R4. If your output has a line similar to:
  817.  
  818.     U491068 01.02.0003.0000 COMPLETE   COMMIT     07/28/93   12:50:42 root
  819.  
  820. you have X11 R5. Some people also call these AIXwindows 1.2.0 and 1.2.3.
  821.  
  822.  
  823. 1.501: How to prevent ctrl-alt-backspace from killing the X session
  824.  
  825. Start X with 'xinit -T' to disable ctrl-alt-backspace from stopping X.
  826.  
  827.  
  828. 1.502: Who has a termcap/terminfo source for the HFT console?
  829.  
  830. The console used on the RISC System/6000, PS/2 and RT can be used as a
  831. terminal on another system with the termcap below.  You can find this
  832. and other termcaps in /lib/libtermcap/termcap.src, including IBM
  833. specific ones.  The terminfo sources are stored in /usr/lib/terminfo/*.ti.
  834. This termcap can also be used from an aixterm window.
  835.  
  836. hf|hft|hft-c|ibm8512|ibm8513|IBM_High_Function_Terminal:\
  837.     :co#80:li#25:am:ht:\
  838.     :cm=\E[%i%d;%dH:ti=\E[25;1H:te=\E[20h:\
  839.     :nd=\E[C:up=\E[A:do=^J:ho=\E[H:\
  840.     :bs:sf=\E[S:ec=\E[%dX:\
  841.     :cl=\E[H\E[J:cd=\E[J:ce=\E[K:\
  842.     :AL=\E[%dL:DL=\E[%dM:al=\E[L:dl=\E[M:\
  843.     :im=\E[4h:ei=\E[4l:mi:\
  844.     :dm=\E[4h:ed=\E[4l:\
  845.     :so=\E[7m:se=\E[m:ul=\E[4m:ue=\E[m:\
  846.     :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:\
  847.     :as=^N:ae=^O:sc=\E[s:rc=\E[u:\
  848.     :kl=\E[D:kb=^H:kr=\E[C:ku=\E[A:kd=\E[B:kh=\E[H:\
  849.     :kn#10:k1=\E[001q:k2=\E[002q:k3=\E[003q:k4=\E[004q:k5=\E[005q:\
  850.     :k6=\E[006q:k7=\E[007q:k8=\E[008q:k9=\E[009q:k0=\E[010q:\
  851.     :is=\Eb\E[m^O\E[?7h:rs=\Eb\E[m^O\E[?7h\E[H\E[J:
  852.  
  853.  
  854. 1.503: How can I look at PostScript files?  Why is "dpsexec" so lousy?
  855. From Marc Pawliger (marc@sti.com)
  856.  
  857. showps comes with the 1.2.3 (X11R5) version of the X11rte.ext.obj LPP.
  858. Very nice PS file previewer from Adobe.  Replaces xpsview which came
  859. with pre-1.2.3 Installed as /usr/lpp/DPS/showps/showps
  860.  
  861. From: VRBASS@ATLVMIC1 (Vance R. Bass)
  862.  
  863. You can look at PostScript files using either "xpreview" (in the
  864. optionally installable text formatting services) or you can get
  865. Ghostscript and Ghostview from a comp.sources.x server and build it
  866. yourself.
  867.  
  868. >From the "xpreview" man page:
  869. The xpreview command is an AIXwindows 1.2- and Motif 1.1-based
  870. application that displays output from the troff command on an AIXwindows
  871. display.  The troff command output file must be prepared for any one of
  872. the devX100, devX100K or devpsc devices.  The xpreview command also
  873. displays PostScript language files that begin with %!.
  874.  
  875. "dpsexec" is NOT intended to be a full-service document browser, but
  876. rather a simple DPS code debugger.  If you insist on using it, you can
  877. edit your PS code to remove the "showpage" (which will reset dpsexec
  878. and clear the window) to view single-page files.  It does not handle
  879. multi-page files gracefully.
  880.  
  881.  
  882. 1.504: unix:0 vs `hostname`:0
  883.  
  884. 1.) Is there any way to get the machine to check its local host table
  885.     first without renaming resolv.conf?
  886.  
  887. PTF U412845 implements an environment variable to set the resolver
  888. time out in AIX 3.2.  This allows you to set RES_TIMEOUT to the number
  889. of seconds before it times out, a failing a DNS query the machine will
  890. consult /etc/hosts.  
  891.  
  892. 2.) How do you tell X applications where you are if the console display 
  893.     is unix:0?
  894.  
  895. From: crow@waterloo.austin.ibm.com (David L. Crow)
  896.  
  897.   I would suggest that if you have R5, use ":<display>.<screen>".  I do
  898.   not believe that R4 clients will understand :0, so I would suggest
  899.   unix:0 for them.
  900.  
  901.   Without specifying unix or the hostname, you will get the fastest
  902.   transport mechanism.  While currently there are only two transport
  903.   methods in the AIXwindows X server (Unix sockets and TCP sockets),
  904.   many vendors are looking at using shared memory as a transport method. 
  905.   If you use :0 (or :0.0 or :1, etc.), then you should get the best
  906.   performance regardless of the available transport methods.
  907.  
  908. From Marc Pawliger (marc@sti.com)
  909.   Using "unix:0" or "hostname:0" when the X11 Shared Memory Transport
  910. (SMT) is installed as part of the 1.2.3 X11rte.obj (X11R5) will incur
  911. a penalty vs. using ":0" See /usr/lpp/X11/README.SMT
  912.  
  913. 3.) Is there a significant performance penalty incurred by using
  914.     `hostname`:0 as DISPLAY?
  915.  
  916.   Yes! Using unix:0, you are using Unix sockets.  These are much faster
  917.   than their TCP socket counterparts.
  918.  
  919.  
  920. 1.505: VT100 key bindings for aixterm
  921. From: haedener@iac.unibe.ch (Konrad Haedener)
  922.  
  923. Add this to your .Xdefaults file and start your VAX session with
  924. 'aixterm -v -name vt100 -e telnet MYVAXHOST'
  925.  
  926. -----
  927. vt100.foreground: Wheat
  928. vt100.background: MidnightBlue
  929. vt100.font: Rom14.500
  930. vt100.geometry: 80x25+0+0
  931. vt100.vt102: true
  932. vt100.fullcursor: false
  933. vt100.pointerColor: coral
  934. vt100.cursorColor: gray100
  935. vt100.translations:    <Key>F1: string(0x1b) string("OP") \n\
  936.                        <Key>F2: string(0x1b) string("OQ") \n\
  937.                        <Key>F3: string(0x1b) string("OR") \n\
  938.                        <Key>F4: string(0x1b) string("OS") \n\
  939.                        <Key>KP_0: string(0x1b) string("Op") \n\
  940.                        <Key>KP_1: string(0x1b) string("Oq") \n\
  941.                        <Key>KP_2: string(0x1b) string("Or") \n\
  942.                        <Key>KP_3: string(0x1b) string("Os") \n\
  943.                        <Key>KP_4: string(0x1b) string("Ot") \n\
  944.                        <Key>KP_5: string(0x1b) string("Ou") \n\
  945.                        <Key>KP_6: string(0x1b) string("Ov") \n\
  946.                        <Key>KP_7: string(0x1b) string("Ow") \n\
  947.                        <Key>KP_8: string(0x1b) string("Ox") \n\
  948.                        <Key>KP_9: string(0x1b) string("Oy") \n\
  949.                        <Key>KP_Divide: string(0x1b) string("OQ") \n\
  950.                        <Key>KP_Multiply: string(0x1b) string("OR") \n\
  951.                        <Key>KP_Subtract: string(0x1b) string("OS") \n\
  952.                        <Key>KP_Add: string(0x1b) string("Om") \n\
  953.                        <Key>KP_Enter: string(0x1b) string("OM") \n\
  954.                        <Key>KP_Decimal: string(0x1b) string("On") \n\
  955.                        <Key>Next: string(0x1b) string("Ol") \n\
  956.                        <Key>Left: string(0x1b) string("OD") \n\
  957.                        <Key>Up: string(0x1b) string("OA") \n\
  958.                        <Key>Right: string(0x1b) string("OC") \n\
  959.                        <Key>BackSpace : string(0x7f) \n\
  960.                        <Key>Down: string(0x1b) string("OB")
  961.  
  962. You should also add
  963.  
  964. XENVIRONMENT=$HOME/.Xdefaults
  965. export XENVIRONMENT
  966.  
  967. to your .profile.
  968.  
  969.  
  970. 1.506: Is there a screen saver that does not use excessive CPU?
  971.  
  972. From: buchholz@ese.ogi.edu (Don Buchholz)
  973.  
  974. Try using xlock with these options:
  975.  
  976.     xlock -mode life -count 1500 -nice 20 -root
  977.  
  978.  
  979. From: pranav@evolving.com (Pranav Vakil)
  980.  
  981. Use mlock -hide to hide the background. You can also modify the mlock
  982. (/usr/local/tools/mlock) code to allow the standard X screen saver to
  983. take effect. The timeout value is originally set to 0 which means the
  984. screen saver is off. Modify this to be 120 (2 minutes) and set the
  985. interval time to be 60 (1 minute). Using these intervals, I have found
  986. that over a 24 hour period, it uses only .3 cpu minutes.
  987.  
  988. 1.507: Where are the colors, availible for an X session, listed.
  989.  
  990. /usr/lpp/x_st_mgr/bin/rgb.txt
  991.  
  992.  
  993. 1.508: Why does my app hang the X server but not an X station?
  994. From: brox@corena.no (Bjorn P. Brox)
  995.  
  996. /usr/lpp/X11/README.SMT X client/server communication uses a 64k
  997. buffer by default.  The size of this buffer is controled by the
  998. X_SHM_SIZE environment variable increasing the size of the buffer has
  999. been used to prevent some applications from hanging the X server :)
  1000.  
  1001. 1.509: How do I switch the control and caps lock key bindings?
  1002.  
  1003. If you are running the X window system, you can put the following into
  1004. .xmodmaprc
  1005.  
  1006.   remove Lock = Caps_Lock
  1007.   remove Control = Control_L
  1008.   keysym Control_L = Caps_Lock
  1009.   keysym Caps_Lock = Control_L
  1010.   add Lock = Caps_Lock
  1011.   add Control = Control_L
  1012.  
  1013. 1.510: Missing fonts?
  1014.  
  1015. If your Xserver supports X11R5 try running a font server (edit
  1016. /usr/lib/X11/fs/config and run fsconf && startsrc -s fs) Consult your
  1017. Xserver instructions on how to include a font server in your font
  1018. path.
  1019.  
  1020. 1.511: What's the termcap entry for an IBM 3151 look like?
  1021.  
  1022. #
  1023. # Written by Aleksandar Milivojevic, alex@srce.hr
  1024. # 24.09.1994
  1025. #
  1026. I2|ibm3151|3151|IBM 3151 terminal:\
  1027.     :am:mi:cr=^M:sf=^J:co#80:li#24:cd=\EJ:ce=\EI:cm=\EY%+\040%+\040:\
  1028.     :cl=\EH\EJ:dc=\EQ:dl=\EO:do=\EB:le=\ED:mb=\E4$a:md=\E4(a:\
  1029.     :me=\E4@\E>B:mr=\E4!a:nd=\EC:se=\E4>b:so=\E4!a:ue=\E4=b:up=\EA:\
  1030.     :us=\E4"a:kb=^H:kd=\EB:kh=\EH:kl=\ED:kr=\EC:ku=\EA:\
  1031.     :k1=\Ea\r:k2=\Eb\r:k3=\Ec\r:k4=\Ed\r:k5=\Ee\r:\
  1032.     :k6=\Ef\r:k7=\Eg\r:k8=\Eh\r:k9=\Ei\r:k0=\Ej\r:\
  1033.     :ti=\E>B:te=\E>B:ms:ho=\EH:bl=^G:al=\EN:ta=^I:
  1034.  
  1035.  
  1036. 1.512: Errors starting X11 application binaries from aixpdslibs.
  1037. From: ftp://aixpdslib.seas.ucla.edu/pub/README_X11R5_Stuff
  1038.  
  1039. We have been aware of the problem people have with dynamic links
  1040. when running the prebuilt of X-stuffs from this library.
  1041.  
  1042. The typical error messages will be:
  1043.  
  1044.     Could not load program [program_name]
  1045.     Member shr4.o not found or file not an archive
  1046.     Member shr4.o not found or file not an archive
  1047.     Could not load library libXt.a[shr4.o]
  1048.     Error was: No such file or directory
  1049.  
  1050. It's because that we built the programs using X11 libraries of MIT
  1051. which are not compatible with those of IBM.  If this is the case,
  1052. then please get the compressed tarred file of the source code instead,
  1053. and recompile them on your system using your libraries.
  1054.  
  1055.  
  1056. ______________________________________________________________________________
  1057. 1.600: My named dies frequently, why?
  1058.  
  1059. Running on 3.2, named dies frequently on network's primary name server.
  1060.  
  1061. From: jpe@ee.egr.duke.edu (John P. Eisenmenger)
  1062.  
  1063. Try the following:
  1064.  
  1065.      stopsrc -s named        # stop running named
  1066.      setenv MALLOCTYPE 3.1    # use 3.1 memory allocation algorithm
  1067.      /etc/named ...        # don't use smit to start named
  1068.  
  1069. You might be able to use startsrc/smit after setting MALLOCTYPE and get
  1070. the same effect, but I'm not sure.
  1071.  
  1072. [According to John, the problem is malloc() in the named code. He
  1073.  also suggests using Berkeley's bind, which he has ported and can be
  1074.  ftp'ed from ftp.egr.duke.edu, /archives/network/bind-4.8.3.tar.Z. -ed]
  1075.  
  1076. Two ptfs should fix this problem. Get U412332 and U414752.
  1077.  
  1078. Christophe Wolfhugel <Christophe.Wolfhugel@grasp.insa-lyon.fr> reports
  1079. that bind 4.9 works fine on AIX 3.2 and without MALLOCTYPE=3.1.
  1080.  
  1081.  
  1082. 1.601: How do I trace ethernet packets on an AIX system?
  1083. From: afx@muc.ibm.de (Andreas Siegert)
  1084.  
  1085. Do the following:
  1086.  
  1087.      iptrace -i en0 /tmp/ipt
  1088.  
  1089. The iptrace backgrounds.  Find its process id and kill it when you are
  1090. ready.  Then run
  1091.  
  1092.      ipreport -rns /tmp/ipt >/tmp/ipr
  1093.  
  1094. and look at the output.  The current version of Info does not document
  1095. the r, n and s options but they are quite useful for layering the output.
  1096.  
  1097.  
  1098. 1.602 What is the authorized way of starting automount at boot time?
  1099. From: curt@ekhadafi.austin.ibm.com (Curt Finch)
  1100.  
  1101. I put this in my /etc/inittab:
  1102.  
  1103. automount:2:once:/usr/etc/automount -T -T -T -v >/tmp/au.se 2>&1
  1104.  
  1105. I hereby dub it authorized.
  1106.  
  1107.  
  1108. 1.603: How do I set a tty port for both dial-in and dial-out?
  1109.  
  1110. Set the mode of the tty to be either 'shared' or 'delayed'. 
  1111.  
  1112.  
  1113. 1.604: How to move or copy whole directory trees across a network
  1114.  
  1115. The following command will move an entire directory tree across a network 
  1116. while preserving permissions, uids and gids.
  1117.  
  1118.       $rsh RemoteHost "cd TargetDir; tar -cBf - ." | tar -xvBf -
  1119.  
  1120. Explanation:
  1121.  
  1122. The tar-create is rsh'd to the remote system and is written to
  1123. stdout (the pipe).
  1124.  
  1125. The local system is extracting the tar that is being read from
  1126. stdin (the pipe).
  1127.  
  1128.  
  1129. 1.605: How can I send mail to hosts that cannot be pinged?
  1130. From: jupiter.sun.csd.unb.ca!dedourek (John DeDourek)
  1131.  
  1132. AIX 3.2 as shipped is configured to only send mail to mail addresses
  1133. which include a host name.  Many organizations use a mail address whose
  1134. "host name" part is not a host name (technically an MX name).  To change
  1135. the configuration of the AIX mailer, login as root.  Then edit the file
  1136. /etc/sendmail.cf to remove the comment marker ("# ") at the beginning of
  1137. the line which reads:
  1138.     # OK MX
  1139.  
  1140. Now rebuild the machine readable form of the configuration with
  1141.     sendmail -bz
  1142.  
  1143. and finally restart signal sendmail to load the new configuration by one
  1144. of the following:
  1145.      reboot
  1146. or
  1147.      stopsrc -s sendmail
  1148.      startsrc -s sendmail
  1149. or 
  1150.      kill -1 `cat /etc/sendmail.pid`
  1151.  
  1152.  
  1153. 1.606: How to configure dialup SLIP
  1154.  
  1155. While searching IBM's WWW home page http://www.ibm.com/ I came accross
  1156. a pointer to a fax availible on this topic:
  1157. http://www.austin.ibm.com/pub/www/services/aix_service/faxes/SLIP.DOC.zap
  1158.  
  1159. From: marvin@tornado.oche.de (Christian Bode)
  1160.  
  1161. If you don't have problems with slattach you should have PTF 
  1162. bos.obj 3.2.0.0.U411505 installed.  I assume that you did the right
  1163. ifconfig commands to setup your slip-device (for example sl0).
  1164.  
  1165. 1. Create a group called slip.
  1166.  
  1167. 2. Create a user slip with smit like this:
  1168.                                                      [Entry Fields]
  1169. * User NAME                                          [slip]
  1170.   ADMINISTRATIVE User?                                true
  1171.   User ID                                            []
  1172.   LOGIN user?                                         true
  1173.   PRIMARY group                                      [slip]
  1174.   Group SET                                          [slip]
  1175.   ADMINISTRATIVE groups                              [system]
  1176.   SU groups                                          [slip]
  1177.   HOME directory                                     [/home/slip]
  1178.   Initial PROGRAM                                    [/bin/sh]
  1179.   User INFORMATION                                   [SLIP-Dialup]
  1180.   Another user can SU to user?                        false
  1181.   User can RLOGIN?                                    true
  1182.   TRUSTED PATH?                                       nosak
  1183.   Valid TTYs                                         [/dev/tty1]
  1184.   AUDIT classes                                      []
  1185.   PRIMARY authentication method                      [SYSTEM]
  1186.   SECONDARY authentication method                    [NONE]
  1187.   Max FILE size                                      [2097151]
  1188.   Max CPU time                                       [-1]
  1189.   Max DATA segment                                   [262144]
  1190.   Max STACK size                                     [65536]
  1191.   Max CORE file size                                 [2048]
  1192.   Max physical MEMORY                                [65536]
  1193.   File creation UMASK                                [022]
  1194.   EXPIRATION date (MMDDhhmmyy)                       [0]
  1195.  
  1196. 3. Create a tty with getty on it:
  1197.                                    Add a TTY
  1198.                                                [Entry Fields]
  1199.   TTY type                                     tty
  1200.   TTY interface                                rs232
  1201.   Description                                  Asynchronous Terminal
  1202.   Parent adapter                               sa0
  1203. * PORT number                                  [s1]
  1204.   BAUD rate                                    [38400]
  1205.   PARITY                                       [none]
  1206.   BITS per character                           [8]
  1207.   Number of STOP BITS                          [1]
  1208.   TERMINAL type                                [dumb]
  1209.   STATE to be configured at boot time          [available]
  1210.   DMA                                          on
  1211.   Read Trigger                                 0,1,2,3
  1212.   Transmit buffer count                        [16]
  1213.   Name of initial program to run               [/etc/getty]
  1214.  
  1215.   Note: The following attributes are only applicable if /etc/getty is
  1216.         specified as the initial program to run.
  1217.  
  1218.   Enable program?                              respawn
  1219.   Run level                                    2
  1220.   Enable LOGIN                                 share
  1221.   TIME before advancing to next port setting   [0]
  1222.   STTY attributes for RUN TIME                 [hupcl,cread,brkint>
  1223.   STTY attributes for LOGIN                    [hupcl,cread,echoe,>
  1224.   RUN shell activity manager                   no
  1225.   Optional LOGGER name                         []
  1226.  
  1227. 4. Change the hardware characteristics so that it uses NO XON/XOFF handshake
  1228.    section 1.613 also talks about tty flow control.
  1229.  
  1230. 5. Here is the the .profile for User slip to manage dialups
  1231.  
  1232. PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:/usr/local/bin:.
  1233.  
  1234. ENV=$HOME/.kshrc
  1235. HISTSIZE=128
  1236.  
  1237. export PATH ENV HISTSIZE
  1238. #
  1239. # Search for a LCK-File for our tty if there is one
  1240. #
  1241.  
  1242. if test -f /etc/locks/LCK..tty1
  1243. then
  1244.   SHPID=`cat /etc/locks/LCK..tty1`
  1245. else
  1246.  echo `date` " No LCK-File !!!" >>slip.log
  1247.  exit 64
  1248. fi
  1249.  
  1250. #
  1251. # Search for our own Shell to get the PID for checking against LCK-File
  1252. #
  1253.  
  1254. SH2PID=`ps -aef |
  1255.         sed -n -e 's/^ *slip  *\([0-9][0-9]*\) .*-sh *$/\1/p`
  1256.  
  1257. #
  1258. # Is it the the same PID as in the LCK File so that we can start working ??
  1259. #
  1260.  
  1261. if test $SHPID = $SH2PID
  1262. then
  1263. #  remove the LCK-File because slattach does not like it.
  1264.    rm -rf /etc/locks/LCK..tty1
  1265. #  Add RTS/CTS Handshakeing to our own tty
  1266.    stty add rts
  1267. #  Startup slattach. Slattach has to have mode 4755 to be started up !!!
  1268.    /usr/sbin/slattach tty1
  1269. #  Just say that we are up.
  1270.    echo `date` " Starting up slip-daemon " >>slip.log
  1271. #  leave slattach enough time to startup
  1272.    sleep 4
  1273. else
  1274. # Something must be wrong with the LCK-File
  1275.   SH3PID=`ps -aef | awk ' {print $2}' | grep $SHPID`
  1276.  
  1277.   if test ."$SH3PID" = .""
  1278.   then
  1279.     SH3PID="NO_SUCH_PROCESS"
  1280.   fi
  1281.  
  1282.   if test $SHPID = $SH3PID
  1283.     then
  1284. #  There is a living process which owns the LCK-File !!
  1285.        echo `date` " Can't remove LCK-File, not owner !!!" >>slip.log
  1286.        exit 64
  1287.     else
  1288. #   Who the hell didn't remove the LCK-File (should never happen)
  1289.        echo `date` " LCK-File with no owner found !!!" >>slip.log
  1290.        exit 64
  1291.     fi
  1292. fi
  1293.  
  1294. # Get the pid of slattch so that we can kill him later on.
  1295. SLPID=`ps -aef |
  1296.  sed -n -e 's/^ *slip  *\([0-9][0-9]*\) .*-.*\/usr\/sbin\/slattach tty1 *$/\1/p`
  1297.  
  1298. # Kill slattach if we get a signal 1 (Carrier Lost ? / Otherside-slattach
  1299. # terminated )
  1300. trap "kill $SLPID; exit 0" 1
  1301.  
  1302. # We  will have a nice sleep and nice dreamings
  1303. while sleep 256
  1304. do
  1305. :
  1306. done
  1307.  
  1308. Here's another scenario:
  1309. From: oosten@angelo.ee.ualberta.ca (Brian Oostenbrink)
  1310.  
  1311. Operating System: IBM AIX 3.2.1 and 3.2.3
  1312.  
  1313. Configuring two RS6000s via a Serial Line Interface Protocol (SLIP) 
  1314. connection over two US Robotics Sportster 14,400 modems.
  1315.  
  1316. The AIX implementation of SLIP is slightly different from most others. 
  1317. The ifconfig command is used to bring up a serial interface, and the
  1318. slattach command is used to connect the interface to the serial port
  1319. used for the connection.  Dialer device commands can also be issued when
  1320. invoking the slattach command, using UUCP chat syntax.
  1321.  
  1322. The following describes a connection between two machines:
  1323.  
  1324.      local.j.k.l
  1325.          ethernet IP address 129.128.127.21
  1326.          slip interface IP address 129.1.2.1
  1327.  
  1328.      remote.a.b.c
  1329.          ethernet IP address 129.11.22.44
  1330.          slip interface address 129.11.22.1
  1331.  
  1332. 1. Interface configuration
  1333.  
  1334. Each machine must have a separate IP address dedicated to the SLIP
  1335. interface. On remote.j.k.l, start the SLIP interface with:
  1336.  
  1337.          ifconfig sl0 129.11.22.1 129.128.127.1  up
  1338.  
  1339. and on local.a.b.c:
  1340.  
  1341.          ifconfig sl0 129.128.127.1 129.11.22.1  up
  1342.  
  1343. It is important in later versions of AIX 3.2.3+ to use the same SLIP
  1344. interface # as the ptty port #, ie. if you use tty12, use ifconfig sl12
  1345. instead of sl0.
  1346.  
  1347. At this point the interfaces are ready to be connected.
  1348.  
  1349. 2. tty configuration
  1350.    The tty ports on both machines were configured in an identical manner
  1351.    using smit.
  1352.                                                  [Entry Fields]
  1353.  TTY type                                           tty
  1354.  TTY interface                                      rs232
  1355.  Description                                        Asynchronous Terminal
  1356.  Parent adapter                                     sa0
  1357.  PORT number                                        []                       +
  1358.  BAUD rate                                          [38400]                  +
  1359.  PARITY                                             [none]                   +
  1360.  BITS per character                                 [8]                      +
  1361.  Number of STOP BITS                                [1]                      +
  1362.  TERMINAL type                                      [dumb]
  1363.  STATE to be configured at boot time                [available]              +
  1364.  DMA                                                on                       +
  1365.  Read Trigger                                       0,1,2,3
  1366.  Transmit buffer count                              [16]                      #
  1367.  Name of initial program to run                     [etc/getty]
  1368.  
  1369.  Note: The following attributes are only applicable if /etc/getty is specified
  1370.  as the initial program to run.
  1371.  
  1372.  Enable program?                                    respawn
  1373.  Run level                                          2
  1374.  Enable LOGIN                                       disable                  +
  1375.  TIME before advancing to next port setting         [0]                      +#
  1376.  STTY attributes for RUN TIME                       [hupcl,cread,brkint,icr>
  1377.  STTY attributes for LOGIN                          [hupcl,cread,echoe,cs8,>
  1378.  RUN shell activity manager                         no                       +
  1379.  Optional LOGGER name                               []
  1380.  
  1381. On older versions of AIX, we encountered some problems disabling getty, and
  1382. resorted to changing the /etc/inittab file directly. For example, change
  1383.  
  1384.    tty0:2:respawn:/etc/getty /dev/tty0
  1385. to
  1386.    tty0:2:off:/etc/getty /dev/tty0
  1387.  
  1388. This will disable getty from running. After creating the SLIP tty device,
  1389. you will need to change its hardware configuration to disable Xon/Xoff
  1390. flow control. Software flow control should not be used for SLIP. Type
  1391. 'smit chtty', and then select sub item 2: Hardware settings.
  1392.  
  1393. Most of the parameters in the tty configuration are the defaults.
  1394.  
  1395. 3. Modem Configuration
  1396.  
  1397.    The modems were configured as follows:
  1398.  
  1399.    RTS/CTS flow control enabled.
  1400.    Xon/Xoff software flow control disabled. Usually this is automatic if
  1401.       RTS/CTS is enabled.
  1402.    Data rate, terminal to modem = fixed.
  1403.       This is the baud rate from the tty port to the modem. We used a
  1404.       fixed modem-port transfer rate, set to the fastest speed supported
  1405.       by both the tty port and the modem. Newer modems can use a higher
  1406.       transfer rate between the modem and serial port than the modem to
  1407.       modem rate, which is necessary to use data compression effectively.  
  1408.       In our setup, we used 14.4 kBaud modems with a port speed of 38.4
  1409.       kBaud. If your modem supports this feature, use it, otherwise set
  1410.       the port speed equal to the modem connection rate. On the USR
  1411.       Sportster at&b1 fixes the serial port rate to that of the last
  1412.       AT command. The speed parameter of the slattach command can be
  1413.       used to ensure that this rate is that set in the tty configuration.
  1414.    Error Correction enabled - not mandatory, but a good idea
  1415.    Data Compression - not required, but it helps, especially for text
  1416.       transfers.
  1417.    Auto Answer - If the SLIP connection is to be initiated from either
  1418.       machine, both modems should be set to auto answer, otherwise, just
  1419.       the answering modem.
  1420.  
  1421.    It is a good idea to configure the modem and then save the settings
  1422.    to NVRAM, so that the correct settings can always be restored by the
  1423.    slattach command.
  1424.  
  1425. 4. UUCP configuration files
  1426.  
  1427.    /usr/lib/uucp/Devices
  1428.    /usr/lib/uucp/Dialers
  1429.  
  1430.    The Devices file must contain an entry with the tty and serial port
  1431.    speed used for the interface. In our example,
  1432.       Direct tty0 38400 slipdialer
  1433.  
  1434.    The keyword 'slipdialer' is merely an index into the Dialers file.
  1435.    For our purposes, the slipdialer entry in the Dialers file is simply:
  1436.  
  1437.       slipdialer
  1438.  
  1439.    This entry can also contain UUCP chat commands, or the chat commands
  1440.    can be included in the slattach command.
  1441.  
  1442. 5. slattach invocation
  1443.  
  1444.    slattach connects the device on the tty port to the SLIP interface
  1445.    created by ifconfig, and sends any commands to the tty device if
  1446.    needed. For our example, remote.j.k.l would never initiate a call,
  1447.    only answer incoming calls. Therefore we execute:
  1448.  
  1449.          slattach tty0 38400 '"" ATZ OK ""'
  1450.  
  1451.    which connects the tty at 38400 baud. We could also simply run
  1452.  
  1453.          slattach tty0
  1454.  
  1455.    ie. without any modem commands, but the modem to port speed may not
  1456.    be correctly set this way. In addition, the ATZ command ensures the
  1457.    modem is set to the NVRAM settings.
  1458.  
  1459.    On local.a.b.c type:
  1460.  
  1461.          slattach tty0 38400 '"" ATZ OK \pATDT4925871 BIS ""' 4
  1462.  
  1463.    This establishes the link at 38400 baud, and executes the dial string
  1464.    as shown. The dial string is a UUCP chat string and are configured
  1465.    in an expect send expect send ... format. The string:
  1466.  
  1467.          '"" ATZ OK \pATDT4925871 BIS ""'
  1468.  
  1469.    is interpreted as:
  1470.    expect "" (null string) from modem
  1471.    send   ATZ              to modem
  1472.    expect OK               from modem
  1473.    send   \pATDT4925871    to modem
  1474.    expect BIS              from modem
  1475.  
  1476.    BIS is the end of the CONNECT STRING. You could use any portion of
  1477.    the string returned by the modem upon a connection as the expect
  1478.    string. It may be wiser to simply expect CONNECT since all
  1479.    connections should return this string.
  1480.    The null strings are necessary because the first parameter of the
  1481.    UUCP is an expected string from the modem, which can only be a null
  1482.    string until the modem has been given a command.
  1483.  
  1484.    The last parameter (4) of the slattach command is the debug level. 
  1485.    A debug level of 4 displays the UUCP chat strings, which is useful
  1486.    for checking the modem status.
  1487.  
  1488. 6. Routing
  1489.    ifconfig is sufficient if all you want to do is talk between the
  1490.    two hosts.  If you are running SLIP so that you can talk to more
  1491.    than just that one other host you have to advertise your address.
  1492.    
  1493.    1) arp -s 802.5 iago 10:00:5a:b1:49:d8 pub
  1494.         where 802.5 is a token-ring network the hardware address can
  1495.         be obtained with `netstat -v` and iago was the SLIP client (My
  1496.         PC at home :)  pub is the important part it means "published"
  1497.         You may want to run this at boot time. 
  1498.  
  1499.    Routing through the SLIP link is similiar to routing of any gateway. 
  1500.    Invoking the ifconfig command automatically sets up a route between
  1501.    the two SLIP machines. An entry in /etc/hosts or the named database
  1502.    should be made, with the same machine name used for the SLIP address
  1503.    as the ethernet address on each machine. For example, in /etc/hosts
  1504.    on remote.a.b.c (and any other machine on remote.a.b.c ethernet):
  1505.  
  1506.      129.11.22.44 remote.a.b.c # ethernet address
  1507.      129.11.22.1  remote.a.b.c # slip address
  1508.  
  1509.    It is preferable to place the ethernet address in the hosts file
  1510.    before the SLIP address so remote.a.b.c will resolve to the
  1511.    ethernet address. When using named, it is important to have both
  1512.    addresses in the reverse file with the same name. We experienced
  1513.    difficulties with NFS mounting over the slip link, owing to some
  1514.    machine interpreting NFS requests from one of the two SLIP machines
  1515.    as coming from the SLIP address, while the SLIP machine believed it
  1516.    was sending the request from the ethernet address. This problem was
  1517.    eliminated by having both addresses reverse resolve to the same name.
  1518.  
  1519. 7. Performance
  1520.    At a modem speed of 14.4 kBaud and a port speed of 38.4 kBaud, we
  1521.    realized a transfer rate through ftp of about 3.5 kB/s for text
  1522.    files, and 1.3 kB/s for compressed files.
  1523.  
  1524.  
  1525. 1.607: Where is DCE discussed?
  1526. From: brent@uwovax.uwo.ca (Brent Sterner)
  1527.  
  1528. DCE is the Distributed Computing Environment, which is roughly a
  1529. flexible client-server architecture for heterogenous platforms.
  1530. For more information, take a look in comp.unix.osf.misc. 
  1531.  
  1532.  
  1533. 1.608: How do I make /var/spool/mail mountable?
  1534. From: petersen@pi1.physik.uni-stuttgart.de (Joerg Petersen)
  1535.  
  1536. In our cluster we share a /usr/local disk. We have a directory
  1537. /usr/local/spool/mail and /var/spool/mail is soft-linked to it.
  1538.  
  1539. From: fred@hal6000.thp.Uni-Duisburg.DE (Fred Hucht)
  1540.  
  1541. Several problems has been reported on sharing the mail directory via
  1542. NFS. The problems may occur when two or more sendmail daemons and/or
  1543. mail readers access a user's mail file simultanously, because of NFS'
  1544. file locking mechanism.
  1545.  
  1546. We use another method here: Every user has one line in his/her
  1547. $HOME/.forward file that reads
  1548.  
  1549. xxx@mainserver.domain.name
  1550.  
  1551. where xxx is the user node and mainserver.domain.name is the full
  1552. hostname of one of the machines. Then all incoming mail to all machines
  1553. is forwarded to mainserver, while mainserver ignores this line.
  1554.  
  1555.  
  1556. 1.609: getty spawning too rapidly 
  1557. thanks to aslam@abaseen.lums.edu.pk (Sohail Aslam)
  1558.  
  1559. The problem can occur due a number of modem settings. The most
  1560. frequent is that the echo is not disabled on modems that are to
  1561. accept incoming calls. In hayes language, ATE0 disables echo.
  1562. If echo is enabled, the login prompt sent by the DTE (computer)
  1563. is echoed back to it. It then issues "password:" prompt which
  1564. the modem conveniently echoes back again. And the cycle goes on.
  1565.  
  1566. Another setting to check is the Q registers which controls the
  1567. modem's response to the DTE. The hayes command ATQ0 enables
  1568. results codes. The Q register in conjunction with the X and
  1569. the V registers, reports back to the DTE the status of the incoming
  1570. or outgoing call, and the type of connection established. For
  1571. outgoing calls, one would want to enable result codes but not
  1572. for incoming calls. If codes are enabled (via ATQ0), when a
  1573. call comes in, the modem will send strings (if ATV1 and ATX4 set)
  1574. "RINGING", "CONNECTED" etc. to the local DTE. The getty will think
  1575. some one is trying to login. It will send password prompt. Trouble
  1576. again. Telebit and other intelligent modems has ATQ2 setting
  1577. which says "reports codes only when calling out." For others,
  1578. you will need to disable it (ATQ1) and enable when calling out.
  1579.  
  1580. The DSR setting can be a source of problem. Ideally, modem should
  1581. raise DSR only when CD is detected and modem raises CTS. Computer,
  1582. such as the VAX, wait 30 seconds after the modem raises DSR. If
  1583. CD is not on by that time, the computer will drop DTR causing the
  1584. modem to reset. The DSR should be set to be raised only when
  1585. carrier has been detected. The hayes setting is AT&S1.
  1586.  
  1587. The DCD setting should be such that it reflects the true nature of
  1588. the carrier. The CD can be forced on at all times (AT&C0). This
  1589. is not good. Set it to AT&C1.
  1590.  
  1591. Most modems can reload saved settings from non-volatile memory
  1592. on a DTR transition. This is useful for resetting the modem
  1593. when a call drops. Use AT&D3 to get this effect. 
  1594.  
  1595. For dial in, thus, set AT E0 Q1 &C1 &D3 &S1 &W. The &W stores the
  1596. settings in memory. They will be reloaded due to &D3.
  1597.  
  1598.  
  1599. 1.610: Does AIX support Compressed SLIP (CSLIP)?
  1600.  
  1601. No.  That means no VJ compression either :)  See PPP in section 5.07 
  1602. if you want more than standard SLIP.
  1603.  
  1604.  
  1605. 1.611: How do I setup anonymous ftp on my AIX system?
  1606. (stolen from Peter Klee <klee@dhdibm1.bitnet> posting)
  1607.  
  1608. Have a look at '/usr/lpp/tcpip/samples/anon.ftp'. It is a shell script
  1609. and will set up a anonymous ftp site on your local RS/6000.  Note: the
  1610. ftpd that comes with AIX does not support the display messages every
  1611. time a user changes a directory or even when they login.
  1612.  
  1613. 1.612: Talk, getting notification.
  1614.  
  1615. If you are not getting notification (that someone wants to talk to
  1616. you), use (swcons `tty` && mesg y) in one window.
  1617.  
  1618. There are many variations of 'talk' and finding compatible versions
  1619. for multiple operating systems can be tricky.
  1620.  
  1621. 1.613: Disabling software flow control; using RTS/CTS.
  1622.  
  1623. Different versions of AIX 3.2.5 respond differently to attempts to
  1624. enable flow control (RTS/CTS signals).  This section is an attempt to
  1625. compile a list of different approaches.
  1626.  
  1627. The most straight forward is:
  1628.    chdev -l ttyxx -a rts=yes
  1629.    [ Note: ix40410 for AIX 3.2.5 should give you this functionality.  
  1630.    PTF U426113 and numerous other superceding ptfs should provide this.]
  1631.  
  1632. If carrier signal is high (its connected) you can try
  1633.    stty add rts </dev/ttyxx 
  1634.  
  1635. There is also a program that I first saw on the 800-IBM-4FAX number,
  1636. also found in INFO that will remedy the situation in some cases.  Note
  1637. that this code ignores the return code from ioctl (which on my machine
  1638. is <0 :)
  1639.  
  1640. /* This program is an adaptation of a program provided by IBM Defect Support.
  1641.    It is provided without warrantee, or support.
  1642.  
  1643.    The syntax of the command is:
  1644.  
  1645.     setrts tty [tty [tty [...]]]
  1646.  
  1647.    The program will loop through each tty provided on the command line, and 
  1648.    turn on the 'rts' line discipline.  The program does not require that
  1649.    the Carrier Detect signal be held high to keep the serial device from 
  1650.    blocking on the attempt to open it.  The program works for all valid ttys.
  1651.  
  1652.    BUGS: None that are known; however, using the program to set 'ptys' may
  1653.    cause the 'pty' to become unusable.
  1654.  
  1655.    This program was written by Robin D. Wilson, Pencom Software (with the
  1656.    specific 'ioctl()' call provided by the IBM Defect Support Center.
  1657.  
  1658.    I call it: "setrts"
  1659.    
  1660.    To compile:
  1661.    cc -O -o setrts setrts.c
  1662.    strip setrts
  1663.    
  1664.    (Funny, but if you strip with the compiler (i.e., cc -s), you end up with
  1665.    120 extra bytes in the executable...)
  1666. */
  1667.  
  1668. #include <stdio.h>
  1669. #include <fcntl.h>
  1670. #include <termios.h>
  1671. #include <sys/tty.h>
  1672. #include <string.h>
  1673. #include <sys/param.h>
  1674. #include <unistd.h>
  1675.  
  1676. #define DEVDIR        "/dev/"
  1677. #define    LINEDISP    "rts"
  1678.  
  1679. main (argc, argv)
  1680. int argc;
  1681. char **argv;
  1682. {
  1683.     int tty;
  1684.     char ttyname[MAXPATHLEN];
  1685.  
  1686. /*    Give a 'usage' recommendation if they don't provide an argument */
  1687.     if (argc < 2) {
  1688.        fprintf(stderr, "usage: %s <ttyn> [ttyn [ttyn [...]]]\n",argv[0]);
  1689.        exit(-1);
  1690.     }
  1691.  /*    Otherwise, loop through all the arguments... */
  1692.     else while (--argc >= 1) {
  1693.         argv++;
  1694.  /*    Check to see if they input the 'tty' names with the DEVDIR on them...
  1695.  *    If not, put it on...
  1696.  */
  1697.         if (strncmp(DEVDIR, argv[0], strlen(DEVDIR)) != 0) {
  1698.             strcpy(ttyname, DEVDIR);
  1699.             strcat(ttyname, argv[0]);
  1700.         }
  1701.         else
  1702.             strcpy(ttyname, argv[0]);
  1703.  
  1704. /*    Open the tty.  Use the non-blocking open (O_NDELAY) to open without a 
  1705.  *    carrier (CD) present on the line...
  1706.  */
  1707.         if ((tty = open(ttyname, O_RDWR|O_NDELAY)) < 0) {
  1708.            fprintf(stderr, "%s: couldn't open tty device.\n",ttyname);
  1709.            exit (-2);
  1710.         }
  1711.  /*    Add the 'rts' line discipline... */
  1712.         (void)ioctl(tty, TXADDCD, LINEDISP);
  1713.         (void)close(tty);
  1714.     }
  1715. }
  1716.  
  1717.  
  1718. ______________________________________________________________________________
  1719. 1.900: SCSI-1 and SCSI-2 "interoperability" got you confused?  
  1720.  
  1721. A.  SCSI-1 devices are supported on a SCSI-2 adapter.  This
  1722.     config will provide SCSI-1 performance.
  1723.  
  1724. B.  SCSI-2 devices are supported on a SCSI-1 adapter.  This
  1725.     config will provide SCSI-1 performance.
  1726.  
  1727. C.  A mix of SCSI-2 and SCSI-1 devices are supported on a SCSI-1
  1728.     adapter.  All devices will have SCSI-1 performance.
  1729.  
  1730. D.  A mix of SCSI-2 and SCSI-1 devices are supported on a SCSI-2
  1731.     adapter.  SCSI-2 devices will have SCSI-2 performance (10 MB/sec)
  1732.     and SCSI-1 devices will have SCSI-1 performance (4-5 MB/sec).
  1733.  
  1734.  
  1735. 1.901: How to get your keyboard back after unplugging it from the 6000
  1736. From: Mickey Coggins and Anne Serre
  1737.  
  1738. When you unplug your keyboard from a running system, and plug it back
  1739. in, the key mapping is wrong.  For example, keys like Caps Lock and Ctrl
  1740. don't work as designed.
  1741.  
  1742. Solution: Type at the command line
  1743.  
  1744.         /usr/lpp/diagnostics/da/dkbd
  1745.  
  1746. Your screen goes black, you hear a few beeps, and your keyboard is reset.
  1747. It works with any environment, Xwindows, hft, NLS...
  1748.  
  1749. For Models 220, 230 and M20, use the following commands:
  1750.  
  1751. /usr/lpp/diagnostics/da/dkbd
  1752. /usr/lpp/diagnostics/da/dkbdsal   (for the 220)
  1753.  
  1754.  
  1755. 1.902: How do I set up pcsim, the DOS emulator?
  1756.  
  1757. You must have a bootable DOS diskette to install pcsim. Either DOS 3.3, 
  1758. 4.x, or 5.0 will work. IBM do not officially support DOS 5.0 for pcsim
  1759. but I have no problems with it. Just don't try to be fancy with the UMB 
  1760. and memory manager stuff.
  1761.  
  1762. With a bootable DOS disk in the drive, do:
  1763. $touch /u/dosdrive (this is the AIX file for DOS emulation)
  1764. $pcsim -Adiskette 3 -Cdrive /u/dosdrive
  1765. You would now get an A prompt. Type:
  1766. A> fdisk
  1767. Create the virtual C drive of whatever size you choose. Make it large 
  1768. enough for your needs since you cannot enlarge it later.
  1769. A> format c: /s (to format the virtual C drive)
  1770. Now exit from pcsim with ESCpcsim (Esc key followed by pcsim).
  1771.  
  1772. Now create a simprof file. Following is a starter:
  1773.  
  1774. Adiskette   : 3
  1775. Cdrive      :/u/dosdrive
  1776. lpt1        : name of printer queue
  1777. refresh     : 50
  1778. dmode       : V
  1779. mouse       : com1
  1780.  
  1781. You can now start pcsim anytime by typing pcsim. Make sure no floppies
  1782. are in the drive. For further information, refer to publication
  1783. SC23-2452, Personal Computer Simulator/6000 Guide and Reference.
  1784.        
  1785.  
  1786. 1.903: How do I transfer files between AIX and DOS disks?
  1787.  
  1788. In one of the bos extensions are commands for transferring files between
  1789. DOS diskettes and AIX. The commands are dosread, doswrite, dosdir, dosdel,
  1790. and dosformat. Many users have mentioned that the mtools package from
  1791. prep.ai.mit.edu is better than the native AIX programs.
  1792.  
  1793.  
  1794. 1.904: Where is the crypt program.
  1795.  
  1796. You can use PGP or crypt depending on your needs both require that you 
  1797. are a United States citizen and you reside in the United States.
  1798. Crypt is availible from your IBM marketing branch office.
  1799.  
  1800. The United States government classifies encryption technology as a
  1801. munition, meaning that you need an arms license to sell it overseas or
  1802. to non-US nationals.
  1803.  
  1804. _____________________________________________________________________________
  1805. 2.00: C/C++
  1806.  
  1807. Contrary to many people's belief, the C environment on the RS/6000 is
  1808. not very special.  The C compiler has quite a number of options that can
  1809. be used to control how it works, which "dialect" of C it compiles, how
  1810. it interprets certain language constructs, etc.  InfoExplorer includes a
  1811. Users Guide and a Reference Manual.
  1812.  
  1813. The compiler can be invoked with either xlc for strict ANSI mode and cc
  1814. for RT compatible mode (i.e. IBM 6150 with AIX 2).  The default options
  1815. for each mode are set in the /etc/xlc.cfg file, and you can actually add
  1816. another stanza and create a link to the /bin/xlc executable.
  1817.  
  1818. The file /usr/lpp/xlc/bin/README.xlc has information about the C
  1819. compiler, and the file /usr/lpp/bos/bsdport contains useful information,
  1820. in particular for users from a BSD background.
  1821.  
  1822. The file /etc/xlc.cfg also shows the symbol _IBMR2 that is predefined,
  1823. and therefore can be used for #ifdef'ing RS/6000 specific code.
  1824.  
  1825.  
  1826. 2.01: I cannot make alloca work
  1827.  
  1828. A famous routine, in particular in GNU context, is the allocation
  1829. routine alloca().  Alloca allocates memory in such a way that it is
  1830. automatically free'd when the block is exited.  Most implementations
  1831. does this by adjusting the stack pointer.  Since not all C environments
  1832. can support it, its use is discouraged, but it is included in the xlc
  1833. compiler.  In order to make the compiler aware that you intend to use
  1834. alloca, you must put the line
  1835.  
  1836. #pragma alloca
  1837.  
  1838. before any other statements in the C source module(s) where alloca is
  1839. called.  If you don't do this, xlc will not recognize alloca as anything
  1840. special, and you will get errors during linking.
  1841.  
  1842. For AIX 3.2, it may be easier to use the -ma flag.
  1843.  
  1844.  
  1845. 2.02: How do I compile my BSD programs?
  1846.  
  1847. The file /usr/lpp/bos/bsdport contains information on how to port
  1848. programs written for BSD to AIX 3.1.  This file may be very useful for
  1849. others as well.
  1850.  
  1851. A quick cc command for most "standard" BSD programs is:
  1852.   
  1853.   $ cc -D_BSD -D_BSD_INCLUDES  -o [loadfile] [sourcefile.c] -lbsd
  1854.  
  1855. If your software has system calls predefined with no prototype
  1856. parameters, also use the -D_NO_PROTO flag.
  1857.  
  1858.  
  1859.  
  1860.